from django.shortcuts import render
from django.http import HttpResponse,HttpResponseRedirect
# Create your views here.
from . import service
def index(request):
    #1获取数据
    #2 render渲染首页
    # mymlcs =service.getAllPoems()

    # return render(request,'ymlc/index.html',{'mymlcs':mymlcs})
    return render(request,'ymlc/index.html')


def detail(request,id):
    return HttpResponse("detail page of {}".format(id))


def add(request):
    return HttpResponse("add page")

def delete(request,id):
    return HttpResponse("delete page of {}".format(id))

def edit(request,id):
    return HttpResponse("edit page of {}".format(id))